"""
============================
@auther:多测师-黄sir
@time:2021/9/14:16:38
@email:hw18983616870@163.com
@website:www.duoceshi.cn
============================
"""
import requests
import unittest
from config.Config import *
from api.Api import Api
class Cms_Login(unittest.TestCase):

    @classmethod
    def setUpClass(cls) -> None:
        cls.session = requests.Session()
        Api().set_session(cls.session)
        cls.se = Api().get_session()

    def test_login(self):
        api_ele = ['post',cms_login_url,cms_login_data,cms_login_headers]
        Api().send_api(api_ele=api_ele)
        self.value = Api().api_json_assert()
        assert self.value['msg'] == '登录成功！'
if __name__ == '__main__':
    unittest.main(verbosity=2)







